Add .NET SDK support for new lifecycle event types#218
Add .NET SDK support for new lifecycle event types#218eddie-lee-msft wants to merge 2 commits intomainfrom
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Adds new Agent 365 lifecycle event support to the Notifications SDK so consumers can validate and register handlers for additional agentic user lifecycle notifications.
Changes:
- Added new lifecycle event constants: agentic user undeleted, identity updated, and manager updated.
- Expanded lifecycle event validation to recognize the new event types.
- Introduced new
AgentApplicationextension methods to register handlers for each new lifecycle event.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/Notification/Microsoft.Agents.A365.Notifications/Constants.cs |
Adds new Events.* string constants for additional lifecycle event types. |
src/Notification/Microsoft.Agents.A365.Notifications/AgentNotification.cs |
Updates lifecycle event validation and adds new registration extension methods for the new events. |
| Events.AgenticUserIdentityCreated => true, | ||
| Events.AgenticUserWorkloadOnboardingUpdated => true, | ||
| Events.AgenticUserDeleted => true, | ||
| Events.AgenticUserUndeleted => true, | ||
| Events.AgenticUserIdentityUpdated => true, | ||
| Events.AgenticUserManagerUpdated => true, | ||
| _ => false, |
There was a problem hiding this comment.
New lifecycle event types were added to the SDK's validation logic, but there are currently no unit tests covering lifecycle event validation (unlike subchannel validation). Adding tests that assert these new Events constants are accepted by the lifecycle-event validation would help prevent regressions when new event types are introduced.
There was a problem hiding this comment.
Does not even look like there are unit tests today.
Add .NET SDK support for new lifecycle event types